/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DlinkedList;

/**
 *
 * @author Administrator
 */
public interface LinkedList
{
    /**
     * Inserts the specified element at the specified position in
        this list.
     * @param index
     * @param element
     */
    public void add(int index, Object element);
	/**
     * Inserts the specified element at the end of the list.
     * @param element
     */
    public void add(Object element);
	/**
     * Returns the element at the specified position in this list.
     * @param index
     * @return
     */
    public Object get(int index);
    /**
     * Replaces the element at the specified position in this list
        with the specified element.
     * @param index
     * @param element
     */
	public void set(int index, Object element);
	/**
     * Removes all of the elements from this list.
     */
    public void clear();
	/**
     * Returns true if this list contains no elements.
     * @return
     */
    public boolean isEmpty();
	/**
     * Removes the element at the specified position in this list.
     * @param index
     */
    public void remove(int index);
	/**
     * Returns the number of elements in this list.
     * @return
     */
    public int size();
	/**
     * Returns a view of the portion of this list between the
        specified fromIndex and toIndex, inclusively.
     * @param fromIndex
     * @param toIndex
     * @return
     */
    public MyDList sublist(int fromIndex, int toIndex);
	/**
     * Returns true if this list contains an element that has the
        same value as the specified element.
     * @param o
     * @return
     */
    public boolean contains(Object o);
	/**
     * Returns an iterator to enable the multiple traversals on the
        list elements
     * @return
     */
    public MyLLIterator getIterator();
}
